﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WLMes.Models
{
    /// <summary>
    /// 生产任务单集合
    /// </summary>
    public class TaskSets
    {
        /// <summary>
        /// 任务单 序号
        /// </summary>
        public int TaskSequenceNumber { get; set; }
        /// <summary>
        /// 产出物料的物料编码
        /// </summary>
        public string PartMatCode { get; set; }
        /// <summary>
        /// 产出物料的物料名称或描述
        /// </summary>
        public string PartMatDescription { get; set; }
        /// <summary>
        /// 生产任务单号
        /// </summary>
        public string TaskNumber { get; set; }
        /// <summary>
        /// SAP下发的生产批次号
        /// </summary>
        public string SAPBatchNumber { get; set; }
        /// <summary>
        /// SAP订单描述（原面单上的物料描述）
        /// </summary>
        public string SAPOrderDescription { get; set; }
        /// <summary>
        /// 任务单生产数量
        /// </summary>

        public int Quantity { get; set; }
        /// <summary>
        /// 系列
        /// </summary>
        public string Series { get; set; }
        /// <summary>
        /// 生产工艺
        /// </summary>
        public string ProductionProcess { get; set; }
        /// <summary>
        /// 是否烤漆
        /// </summary>
        public bool ISPAINT { get; set; }
        /// <summary>
        /// 门套板竖板长度（原面单外径尺寸-高）(mm)
        /// </summary>
        public int Outside_Height { get; set; }
        /// <summary>
        /// 门套板横板长度（原面单外径尺寸-宽）(mm)
        /// </summary>
        public int Outside_Width { get; set; }
        /// <summary>
        /// 门套板的宽度（原面单外径尺寸-厚）(mm)
        /// </summary>
        public int Outside_Thickness { get; set; }
        /// <summary>
        /// 门套款式
        /// </summary>
        public string DoorPocket_Style { get; set; }
        /// <summary>
        /// 门扇尺寸-高(mm)
        /// </summary>
        public int DoorLeaf_Height { get; set; }
        /// <summary>
        /// 门扇尺寸-宽(mm)
        /// </summary>
        public int DoorLeaf_Width { get; set; }

        /// <summary>
        /// 门扇尺寸-厚(mm)
        /// </summary>

        public int DoorLeaf_Thickness { get; set; }
        /// <summary>
        /// 门扇款式
        /// </summary>
        public string DoorLeaf_Style { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }
        /// <summary>
        /// 线条面数(单面/双面)
        /// </summary>
        public int StripSides { get; set; }
        /// <summary>
        /// 门套线-推面(mm)
        /// </summary>
        public int DoorCasing_PushSide { get; set; }
        /// <summary>
        /// 门套线-拉面(mm)
        /// </summary>
        public int DoorCasing_PullSide { get; set; }
        /// <summary>
        /// 门套线-线宽(mm)
        /// </summary>
        public int DoorCasing_Width { get; set; }
        /// <summary>
        /// 门头-推面 (造型的文字描述)
        /// </summary>
        public string DoorHead_PushSide { get; set; }
        /// <summary>
        /// 门头-拉面(造型的文字描述)
        /// </summary>
        public string DoorHead_PullSide { get; set; }
        /// <summary>
        /// 部件长
        /// </summary>
        public int PartLength { get; set; }
        /// <summary>
        /// 部件宽
        /// </summary>
        public int PartWidth { get; set; }
        /// <summary>
        /// 部件厚
        /// </summary>
        public int PartThickness { get; set; }
        /// <summary>
        /// 部件大类
        /// </summary>
        public string PartCategories { get; set; }
        /// <summary>
        /// 备注（客户特殊需求，可无）
        /// </summary>
        public string Comment { get; set; }
        /// <summary>
        /// 任务单部件集合（2021.01.27新增）
        /// </summary>
        public List<PartSets_Lists> PartSets { get; set; } = new List<PartSets_Lists>();

        /// <summary>
        /// 输入物料尺寸
        /// </summary>
        public List<SourcePartSizeSets> SourcePartSizeSets { get; set; } = new List<SourcePartSizeSets>();
        /// <summary>
        /// 输出物料尺寸
        /// </summary>

        public List<TargetPartSizeSets> TargetPartSizeSets { get; set; } = new List<TargetPartSizeSets>();
        /// <summary>
        /// 加工程序集合
        /// </summary>

        public List<ProductionProgramSets> ProductionProgramSets { get; set; } = new List<ProductionProgramSets>();
        /// <summary>
        /// 文件附件集合
        /// </summary>
        public List<AttachmentSets> AttachmentSets { get; set; } = new List<AttachmentSets>();
        /// <summary>
        /// 物料集合
        /// </summary>

        public List<MaterialSets> MaterialSets { get; set; } = new List<MaterialSets>();
        /// <summary>
        /// 加工参数集合
        /// </summary>

        public List<ParameterSets> ParameterSets { get; set; } = new List<ParameterSets>();

    }
    [SugarTable(TableName = "TaskSets")]
    public class TaskSetsDTO {
        public string TaskSets_ID { get; set; }
        /// <summary>
        /// 任务单 序号
        /// </summary>
        public int TaskSequenceNumber { get; set; }
        /// <summary>
        /// 产出物料的物料编码
        /// </summary>
        public string PartMatCode { get; set; }
        /// <summary>
        /// 产出物料的物料名称或描述
        /// </summary>
        public string PartMatDescription { get; set; }
        /// <summary>
        /// 生产任务单号
        /// </summary>
        public string TaskNumber { get; set; }
        /// <summary>
        /// SAP下发的生产批次号
        /// </summary>
        public string SAPBatchNumber { get; set; }
        /// <summary>
        /// SAP订单描述（原面单上的物料描述）
        /// </summary>
        public string SAPOrderDescription { get; set; }
        /// <summary>
        /// 任务单生产数量
        /// </summary>

        public int Quantity { get; set; }

        public int CompleteQty { get; set; }
        /// <summary>
        /// 系列
        /// </summary>
        public string Series { get; set; }
        /// <summary>
        /// 生产工艺
        /// </summary>
        public string ProductionProcess { get; set; }
        /// <summary>
        /// 是否烤漆
        /// </summary>
        public bool ISPAINT { get; set; }
        /// <summary>
        /// 门套板竖板长度（原面单外径尺寸-高）(mm)
        /// </summary>
        public int Outside_Height { get; set; }
        /// <summary>
        /// 门套板横板长度（原面单外径尺寸-宽）(mm)
        /// </summary>
        public int Outside_Width { get; set; }
        /// <summary>
        /// 门套板的宽度（原面单外径尺寸-厚）(mm)
        /// </summary>
        public int Outside_Thickness { get; set; }
        /// <summary>
        /// 门套款式
        /// </summary>
        public string DoorPocket_Style { get; set; }
        /// <summary>
        /// 门扇尺寸-高(mm)
        /// </summary>
        public int DoorLeaf_Height { get; set; }
        /// <summary>
        /// 门扇尺寸-宽(mm)
        /// </summary>
        public int DoorLeaf_Width { get; set; }

        /// <summary>
        /// 门扇尺寸-厚(mm)
        /// </summary>

        public int DoorLeaf_Thickness { get; set; }
        /// <summary>
        /// 门扇款式
        /// </summary>
        public string DoorLeaf_Style { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }
        /// <summary>
        /// 线条面数(单面/双面)
        /// </summary>
        public int StripSides { get; set; }
        /// <summary>
        /// 门套线-推面(mm)
        /// </summary>
        public int DoorCasing_PushSide { get; set; }
        /// <summary>
        /// 门套线-拉面(mm)
        /// </summary>
        public int DoorCasing_PullSide { get; set; }
        /// <summary>
        /// 门套线-线宽(mm)
        /// </summary>
        public int DoorCasing_Width { get; set; }
        /// <summary>
        /// 门头-推面 (造型的文字描述)
        /// </summary>
        public string DoorHead_PushSide { get; set; }
        /// <summary>
        /// 门头-拉面(造型的文字描述)
        /// </summary>
        public string DoorHead_PullSide { get; set; }
        /// <summary>
        /// 部件长
        /// </summary>
        public int PartLength { get; set; }

        public string tasksetsUserTime { get; set; }
        /// <summary>
        /// 部件宽
        /// </summary>
        public int PartWidth { get; set; }
        /// <summary>
        /// 部件厚
        /// </summary>
        public int PartThickness { get; set; }
        /// <summary>
        /// 部件大类
        /// </summary>
        public string PartCategories { get; set; }
        /// <summary>
        /// 备注（客户特殊需求，可无）
        /// </summary>
        public string Comment { get; set; }
        /// <summary>
        /// 任务单部件集合（2021.01.27新增）
        /// </summary>
        /// 
        [SugarColumn(IsIgnore = true)]
        public List<PartSets_Lists> PartSets { get; set; } = new List<PartSets_Lists>();

        public string PartSets_ID { get; set; }

        /// <summary>
        /// 输入物料尺寸
        /// </summary>
        /// 
        [SugarColumn(IsIgnore = true)]
        public List<SourcePartSizeSets> SourcePartSizeSets { get; set; } = new List<SourcePartSizeSets>();
        /// <summary>
        /// 输出物料尺寸
        /// </summary>
        /// 
        public string SourcePartSizeSets_ID { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<TargetPartSizeSets> TargetPartSizeSets { get; set; } = new List<TargetPartSizeSets>();
        /// <summary>
        /// 加工程序集合
        /// </summary>
        /// 
        public string TargetPartSizeSets_ID { get; set; }
        [SugarColumn(IsIgnore = true)]
        public List<ProductionProgramSets> ProductionProgramSets { get; set; } = new List<ProductionProgramSets>();
        /// <summary>
        /// 文件附件集合
        /// </summary>
        /// 
        public string ProductionProgramSets_ID { get; set; }
        [SugarColumn(IsIgnore = true)]
        public List<AttachmentSets> AttachmentSets { get; set; } = new List<AttachmentSets>();
        /// <summary>
        /// 物料集合
        /// </summary>
        /// 
        public string AttachmentSets_ID { get; set; }
        [SugarColumn(IsIgnore = true)]
        public List<MaterialSets> MaterialSets { get; set; } = new List<MaterialSets>();
        /// <summary>
        /// 加工参数集合
        /// </summary>
        /// 
        public string MaterialSets_ID { get; set; }
        [SugarColumn(IsIgnore = true)]
        public List<ParameterSets> ParameterSets { get; set; } = new List<ParameterSets>();
        public string ParameterSets_ID { get; set; }
    }
}
